package 一些笔试真题;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: a
 * Date: 2022-10-05
 * Time: 12:20
 */

/*
    一年中的第几天
 */
public class bilibili_2 {
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        String s = scanner.next();
        int[] days = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
        String[] str = s.split("-");
        int year = Integer.parseInt(str[0]);
        int month = Integer.parseInt(str[1]);
        int day = Integer.parseInt(str[2]);
        if((year % 4 == 0 && year % 100 != 0) || year % 400 == 0){
            days[2]++;
        }
        for(int i = 1; i < month; i++){
            day += days[i];
        }
        System.out.println(day);
    }
}
